<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'myCenter_diary.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css" href="css/blog_header.css">
		<link rel="stylesheet" type="text/css" href="css/blog_top_head.css">
		<link rel="stylesheet" type="text/css" href="css/header.css">
		<link rel="stylesheet" type="text/css" href="css/blogFriends.css">
		<link rel="stylesheet" type="text/css" href="css/footer.css">
		<link rel="stylesheet" type="text/css"
			href="css/blog_center_right_Friends.css">
		<link rel="stylesheet" type="text/css" href="css/pageStyleOne.css">
		<!--[if lt IE 7]> 
	<script type="text/javascript" src="js/ie6png.js"></script>
	<![endif]-->

		<script type="text/javascript">
function selectTag(showContent, selfObj) {
	// 操作标签

	var tag = document.getElementById("LeftTags").getElementsByTagName("li");
	var taglength = tag.length;
	for (i = 0; i < taglength; i++) {
		tag[i].className = "";
	}
	selfObj.parentNode.className = "LeftSelectTag";
	// 操作内容
	for (i = 0; j = document.getElementById("tagContent" + i); i++) {
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";
}

function selectTag0(showContent, selfObj) {
	// 操作标签
	var tag = document.getElementById("tags").getElementsByTagName("li");
	var taglength = tag.length;
	for (i = 0; i < taglength; i++) {
		tag[i].className = "";
	}
	selfObj.parentNode.className = "selectTag";
	// 操作内容
	for (i = 0; j = document.getElementById("tagContent0" + i); i++) {
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";

}

function selectGroup(group, friendsId, userId) {
	var url = "setFriendsGroupAction?";
	window.location.href = url + "group=" + encodeURI(encodeURI(group))
			+ "&friendsId=" + friendsId + "&userId=" + userId;
}
</script>

	</head>

	<body>
		<s:if test="%{#session.user.userId==userId}">
			<div id="container">
				<%@ include file="styleJsp/header.jsp"%>
				<div id="headerBottom">
					<div id="headerBottomLeft">
						<span class="headerBottomLeft1"><a href="index"><img
									src="images/home_icon.png" /> </a> </span>
						<span class="headerBottomLeft2"><img
								src="images/dot_arrow.png"> </span>
						<span class="headerBottomLeft3"><a href="index">好友</a> </span>
						<span class="headerBottomLeft2"><img
								src="images/dot_arrow.png"> </span>
						<span class="headerBottomLeft3"><a
							href="BoardDisplayAc?boardId=<s:property value='board.boardId'/>">好友列表</a>
						</span>
					</div>
				</div>

				<div class="content">
					<div class="content_left">
						<ul id="LeftTags">
							<li class="friendWord">
								<span class="friendWordType">好友</span>
							</li>
							<li class="LeftSelectTag" id="content_leftType1">
								<a onclick="selectTag('tagContent0',this)"
									href="javascript:void(0)"><span class="wordType">好友列表</span>
								</a>
							</li>

						</ul>
					</div>
					<div class="content_right">
						<div id="tagContent">
							<div class="tagContent LeftSelectTag" id=tagContent0>

								<div id="con">
									<ul id="tags">
										<li class="selectTag">
											<a onClick="selectTag0('tagContent00',this)"
												href="lookFriendsAction_lookUserFriends?userId=${param.userId}">全部好友列表</a>
										</li>
										<li>
											<a onClick="selectTag0('tagContent00',this)"
												href="lookVisitorAction_lookVisitors?userId=${param.userId}">我的访客</a>
										</li>
										<li>
											<a onClick="selectTag0('tagContent00',this)"
												href="lookVisitorAction_lookTraces?userId=${param.userId}">我的足迹</a>
										</li>

									</ul>
									<div id="tagContent0Content">
										<div class="tagContent0 selectTag" id="tagContent00">
											<div class="tagContent00Word">
												<span class="tagContent00Word1">好友列表</span>
												<span class="tagContent00Word2">当前共有<s:property
														value="number" />个好友</span>
											</div>
											<div class="tagContent00Content">
											  <div class="tagContent00ContentLeftAll">
												<div class="tagContent00ContentLeft">
													<s:iterator value="list">
														<div class="tagContent00ContentLeft1">
															<div class="tagContent00ContentLeft1BG">
																<div class="smallImg">
																	<div class="smallImgType">
																		<img src="images/people.gif"
																			style="width: 54; height: 54" />
																	</div>
																</div>
																<div class="tagContent00ContentLeft1BGText">
																	<div class="div1">
																		<span class="name"><a
																			href="blogIndex.jsp?userId=<s:property value="toUser.userId"/>"><s:property
																					value="toUser.userName" /> </a>(<s:property
																				value="friendsGroup" />) </span>
																	</div>
																	<div class="div2">
																		<span class="text">还好</span>
																	</div>
																	<div class="div3">

																		<span class="caozuo"> <a href="#">热度(2)</a>|
																			分组：<select name="select1"
																				onchange="selectGroup(this.value,<s:property value="friendsId"/>,<s:property value="userId"/>)">
																				<option>
																					请选择
																				</option>
																				<option value="好友">
																					好友
																				</option>
																				<option value="同学">
																					同学
																				</option>
																				<option value="同事">
																					同事
																				</option>
																				<option value="亲人">
																					亲人
																				</option>
																				<option value="不认识">
																					不认识
																				</option>
																				<option value="其他">
																					其他
																				</option>
																			</select> </span>
																		<span class="del"><a
																			href="deleteFriendsAction?userId=${session.user.userId}&friendsId=<s:property value="toUser.userId"/>">删除</a>
																		</span>

																	</div>
																</div>
															</div>
														</div>
													</s:iterator>
													</div>
													<div>
														${pagination}
													</div>
												</div>
												<div class="tagContent00Contentright">
													<div class="tagContent00Contentright1">
														<div class="tagContent00Contentright1Title">
															<span class="searchFriends">查找好友</span>
														</div>
														<div class="tagContent00Contentright1Text">
															<span class="formType"> <s:form
																	action="lookFriendsAction_lookFriendsSearch"
																	method="post" theme="simple">
																	<s:hidden name="userId" value="%{userId}" />
																	<span class="textfieldType"><s:textfield
																			name="searchContent" cssStyle="text-align:left;" />
																	</span>
																	<input type="image" src="images/search.jpg" />
																</s:form> </span>
														</div>
													</div>
													<div class="tagContent00Contentright2">
														<div class="tagContent00Contentright2Title">
															<span class="wordStyle">好友分组</span>
															
														</div>
														<div class="tagContent00Contentright2Text">
															<ul class="tagContent00Contentright2TextUL">
																<li>
																	<span class="wordTextType"><a
																		href="lookFriendsAction_lookUserFriends?userId=<s:property value="userId" />">全部好友</a>
																	</span>
																</li>
																<li>
																	<span class="wordTextType"> <a
																		href="lookFriendsAction_lookFriendsGroup?group=其他&userId=<s:property value="userId" />">其他</a>
																	</span>
																</li>
										
																<li>
																	<span class="wordTextType"><a
																		href="lookFriendsAction_lookFriendsGroup?group=亲人&userId=<s:property value="userId" />">亲人</a>
																	</span>
																</li>
																<li>
																	<span class="wordTextType"><a
																		href="lookFriendsAction_lookFriendsGroup?group=同事&userId=<s:property value="userId" />">同事</a>
																	</span>
																</li>
																<li>
																	<span class="wordTextType"><a
																		href="lookFriendsAction_lookFriendsGroup?group=同学&userId=<s:property value="userId" />">同学</a>
																	</span>
																</li>
																<li>
																	<span class="wordTextType"><a
																		href="lookFriendsAction_lookFriendsGroup?group=不认识&userId=<s:property value="userId" />">不认识</a>
																	</span>
																</li>
															</ul>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div>
					<%@ include file="styleJsp/footer.jsp"%>
				</div>
			</div>
		</s:if>
		<s:else>
			<div class="tbody">
				<%@ include file="styleJsp/blog_top_head.jsp"%>
				<div class="table">
					<%@ include file="styleJsp/blog_header.jsp"%>
					<div class="center">
						<div class="center_left">
							<div class="center_left_title">
								<b>分享</b>
							</div>
							<div class="center_left_context">
								<div class="center_left_context1">
									<span class="friendsWord">当前共有<s:property value="number" />
										位好友</span>
								</div>
								<div class="center_left_context2">
									<s:iterator value="list">
										<div class="center_left_context2_text">
											<div class="center_left_context2_textImg">
												<div class="center_left_context2_textImgType">
													<img alt="" src="images/people_small.gif" />
												</div>
											</div>
											<div class="center_left_context2_textContent">
												<div class="context2_textContentName">
													<span class="Name"><a
														href="blogIndex.jsp?userId=<s:property value="toUser.userId"/>" /><s:property
																value="toUser.userName" /> </a> </span>
												</div>
												<div class="context2_textContentText">
													<span class="text">积分数：58</span>
												</div>
												<div class="context2_textContentWatch">
													<span class="watch"><a
														href="lookUserAction_lookUserDetails?userId=<s:property value="toUser.userId"/>">查看资料</a>
													</span>
												</div>
											</div>
										</div>
									</s:iterator>
								</div>
							</div>
						</div>
						<%@ include file="styleJsp/blog_center_right_Friends.jsp"%>
					</div>
					<%@ include file="styleJsp/footer.jsp"%>
				</div>
			</div>
		</s:else>
	</body>
</html>
